package binary;

public class HexDemo {
    public static void main(String[] args) {

        int n=0x2e;
        System.out.println(Integer.toHexString(n));
        System.out.println(Integer.toBinaryString(n));

        int m=0b101110;
        System.out.println(m);//以10进制显示
        System.out.println(Integer.toHexString(m));//以16进制显示
        System.out.println(Integer.toBinaryString(m));//以2进制显示

        int a=0x18af6;
        String string = Integer.toBinaryString(a);
        System.out.println(Integer.toBinaryString(a));
        System.out.println(string);







    }
}
